package com.ynet.middleground.mobile.approve.response;

import java.io.Serializable;

import javax.validation.constraints.NotBlank;

import com.ynet.middleground.approve.bean.BusinessSignInfoData;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * BusinessFormDataForFile
 *
 * @author suremotoo
 * @date 2023/03/13 14:43
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "移动审批待签章文件属性信息（前端展示格式）", description = "移动审批待签章文件属性信息（前端展示格式）")
public class BusinessFormDataForFile implements Serializable {

    private static final long serialVersionUID = -4534914648612176909L;

    @ApiModelProperty(value = "文件 id 唯一标识", notes = "文件 id 唯一标识", dataType = "String")
    @NotBlank(message = "文件 id 唯一标识不可为空")
    private String id;

    @ApiModelProperty(value = "参数名", notes = "参数名", dataType = "String")
    private String idName;

    @ApiModelProperty(value = "参数展示名", notes = "参数展示名", dataType = "String")
    private String displayName;

    @ApiModelProperty(value = "参数类型 参考值：text、textarea、img、file、table", notes = "参数类型 参考值：text、textarea、img、file、table",
        dataType = "String", allowableValues = "text,textarea,img,file,table")
    private String type;

    @ApiModelProperty(value = "排序，值越大越靠前", notes = "排序，值越大越靠前", dataType = "Integer")
    private Integer order = 1;

    @ApiModelProperty(value = "是否隐藏-保留字段", notes = "是否隐藏-保留字段", dataType = "Boolean")
    private Boolean isHidden = false;

    @ApiModelProperty(value = "是否只读-保留字段", notes = "是否只读-保留字段", dataType = "Boolean")
    private Boolean isReadonly = false;

    @ApiModelProperty(value = "参数值 文件类型时该值为文件地址，示例： http://xxxxxxx/xxx.pdf ",
        notes = "参数值 文件类型时该值为文件地址，示例： http://xxxxxxx/xxx.pdf ", dataType = "String")
    private String value;

    @ApiModelProperty(value = "是否签章（针对文件，仅 type 为 file 时使用）-暂不使用，保留字段",
        notes = "是否签章（针对文件，仅 type 为 file 时使用）-暂不使用，保留字段", dataType = "Boolean")
    private Boolean isSign = true;

    @ApiModelProperty(value = "签章位置信息", notes = "签章位置信息")
    private BusinessSignInfoData signInfo;

}
